<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: AVL树</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<h1>AVL树</h1>  </div>
<div class="ingroups"><a class="el" href="group___xE4_xBA_x8C_xE5_x8F_x89_xE6_xA0_x91.html">二叉树</a></div></div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structavllnk__root.html">avllnk_root</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">树根  <a href="structavllnk__root.html#_details">更多...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structavllnk__info.html">avllnk_info</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">树信息表  <a href="structavllnk__info.html#_details">更多...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct____avllnk__node.html">__avllnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">AVL树节点  <a href="struct____avllnk__node.html#_details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae2d81f3b3af53007a65e1b962819d938"></a><!-- doxytag: member="AVL树::AVLLNK_LH" ref="gae2d81f3b3af53007a65e1b962819d938" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AVLLNK_LH</b>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3bb1a64b4d2b6f851d731bae028ce75d"></a><!-- doxytag: member="AVL树::AVLLNK_RH" ref="ga3bb1a64b4d2b6f851d731bae028ce75d" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AVLLNK_RH</b>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8fc35c889f50b0a78db2146679222a64"></a><!-- doxytag: member="AVL树::AVLLNK_BL" ref="ga8fc35c889f50b0a78db2146679222a64" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AVLLNK_BL</b>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad79de7db2700611beddbc7fd10846310"></a><!-- doxytag: member="AVL树::AVLLNK_MASK" ref="gad79de7db2700611beddbc7fd10846310" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AVLLNK_MASK</b>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga9f935129e3b1b42561ef2b542ddc8c16">AVLLNK_ROOT</a>(name)&#160;&#160;&#160;<a class="el" href="structavllnk__root.html">avllnk_root</a> name = {NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的树根，并对其初始化  <a href="#ga9f935129e3b1b42561ef2b542ddc8c16"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gad23c26b8eb6162eb970bc21c23072bc9">AVLLNK_NODE</a>(name)&#160;&#160;&#160;<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> name = {0, NULL, NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的节点，并对其初始化  <a href="#gad23c26b8eb6162eb970bc21c23072bc9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga46bf7c9e6c92af98442241e46bc0fb6e">AVLLNK_INFO</a>(name)&#160;&#160;&#160;<a class="el" href="structavllnk__info.html">avllnk_info</a> name = {0, 0, 0}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的树信息表，并对其初始化  <a href="#ga46bf7c9e6c92af98442241e46bc0fb6e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga46ed1ab24644d90c5e70a413f455e670"></a><!-- doxytag: member="AVL树::avllnk_inc" ref="ga46ed1ab24644d90c5e70a413f455e670" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga46ed1ab24644d90c5e70a413f455e670">avllnk_inc</a>(itr)&#160;&#160;&#160;((itr) = avllnk_next(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga16e3c0d56368448f31d026003b3c8f74"></a><!-- doxytag: member="AVL树::avllnk_dec" ref="ga16e3c0d56368448f31d026003b3c8f74" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga16e3c0d56368448f31d026003b3c8f74">avllnk_dec</a>(itr)&#160;&#160;&#160;((itr) = avllnk_prev(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递减 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa5d4560ed66c6bce1884a391b0cef501"></a><!-- doxytag: member="AVL树::avllnk_inc_later" ref="gaa5d4560ed66c6bce1884a391b0cef501" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaa5d4560ed66c6bce1884a391b0cef501">avllnk_inc_later</a>(itr)&#160;&#160;&#160;__avllnk_inc_later(itr, &amp;(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器后自增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2099017c69df209a020ecad6c50130b0"></a><!-- doxytag: member="AVL树::avllnk_dec_later" ref="ga2099017c69df209a020ecad6c50130b0" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga2099017c69df209a020ecad6c50130b0">avllnk_dec_later</a>(itr)&#160;&#160;&#160;__avllnk_dec_later(itr, &amp;(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器后自减 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga4d808bbb0fdc74ca311dfcd3501a72ab">avllnk_foreach</a>(_begin, _end, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏  <a href="#ga4d808bbb0fdc74ca311dfcd3501a72ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga90c6c4362d26d8f4018fe435cb6f997c">avllnk_reverse_foreach</a>(_rbegin, _rend, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">逆向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏  <a href="#ga90c6c4362d26d8f4018fe435cb6f997c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga735253b77b7c2aec0f7bc17680d1035d">AVLLNK_RECURSE_PROC</a>(name, type, param)&#160;&#160;&#160;void name(type * param)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义递归遍历回调函数  <a href="#ga735253b77b7c2aec0f7bc17680d1035d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gad56775ebcd996a1da4be44d5f4963c91">avllnk_recurse_foreach</a>(root, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">正向递归遍历整个树  <a href="#gad56775ebcd996a1da4be44d5f4963c91"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga754839960ffe6023b3c85a88a456a774">avllnk_recurse_reverse_foreach</a>(root, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">逆向递归遍历整个树  <a href="#ga754839960ffe6023b3c85a88a456a774"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaff35c890d83519b776a6186a94ad29ac">avllnk_search</a>(root, newly, greater, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">搜索树中的某个节点  <a href="#gaff35c890d83519b776a6186a94ad29ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaa70312544a3ecfb8d51680b04ba1c745">avllnk_insert</a>(root, newly, greater, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">插入新节点  <a href="#gaa70312544a3ecfb8d51680b04ba1c745"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga6ef8f29070186c926ea5202dd2be868b">avllnk_serialize</a>(root, buf, type, member)&#160;&#160;&#160;__avllnk_serialize(root, (void**)(buf), offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">将树进行序列化为一个有序序列  <a href="#ga6ef8f29070186c926ea5202dd2be868b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga48ba9521f27bb0961ac4b2d5af927732">avllnk_deserialize</a>(root, buf, cnt, type, member)&#160;&#160;&#160;__avllnk_deserialize(root, (void**)(buf), cnt, offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">根据树的序列进行反序列化为一个完整的树  <a href="#ga48ba9521f27bb0961ac4b2d5af927732"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6d7aaed44e837466148513a1e9c4b055"></a><!-- doxytag: member="AVL树::avllnk_pr1" ref="ga6d7aaed44e837466148513a1e9c4b055" args=")(avllnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga6d7aaed44e837466148513a1e9c4b055">avllnk_pr1</a> )(<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">单参数回调函数指针 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab87ebf52c2b6245bb72eb9acae29a644"></a><!-- doxytag: member="AVL树::avllnk_pr2" ref="gab87ebf52c2b6245bb72eb9acae29a644" args=")(avllnk_node *, avllnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gab87ebf52c2b6245bb72eb9acae29a644">avllnk_pr2</a> )(<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *, <a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">双参数回调函数指针 <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga110276c151b52a9e937f120f863cb34b">intrin_align</a> (4) <a class="el" href="struct____avllnk__node.html">__avllnk_node</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga05210b7a523aff433666c4b6c7fec4b4">avllnk_count</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取树的节点总数  <a href="#ga05210b7a523aff433666c4b6c7fec4b4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaeb29658f08fdd8c607c2f04a2dd9afd5">avllnk_distance</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> first, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> last)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算两个节点的迭代距离  <a href="#gaeb29658f08fdd8c607c2f04a2dd9afd5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaa2e635167aec956c163f38e293006b06">avllnk_index_of</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算迭代器的正向索引  <a href="#gaa2e635167aec956c163f38e293006b06"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga3a272f8492a0090feeb1bf4552b7535b">avllnk_reverse_index_of</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算迭代器的逆向索引  <a href="#ga3a272f8492a0090feeb1bf4552b7535b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga584d9cf0d557e45fac9ac792967ecd38">avllnk_depth</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算树的深度  <a href="#ga584d9cf0d557e45fac9ac792967ecd38"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga0bdae474b1779392de944dbe1eee2d0c">avllnk_leafs</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算树的叶子数  <a href="#ga0bdae474b1779392de944dbe1eee2d0c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga9edbfa0855053c7f9bbd4d6e8a86199d">avllnk_get_info</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="structavllnk__info.html">avllnk_info</a> *info)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取树的信息，包括节点数、深度、叶子数  <a href="#ga9edbfa0855053c7f9bbd4d6e8a86199d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga8d0cac80915509c752cfceebce741037">avllnk_rebalance</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node, <a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">插入节点后，对树进行再平衡调整  <a href="#ga8d0cac80915509c752cfceebce741037"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaf66cbfca9147bf2de3109b0792242c6b">avllnk_erase</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *entry)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除某个节点  <a href="#gaf66cbfca9147bf2de3109b0792242c6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga062945f5da72bea1f96c1e79b14ee1d6">avllnk_erases</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> begin, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> end, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga6d7aaed44e837466148513a1e9c4b055">avllnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除区域内的节点  <a href="#ga062945f5da72bea1f96c1e79b14ee1d6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaaed45fd00cc292f5a5ae11c5939b75af">avllnk_init</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化树根  <a href="#gaaed45fd00cc292f5a5ae11c5939b75af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaed7a979e936d126bdfcb326e7c341853">avllnk_empty</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否为空  <a href="#gaed7a979e936d126bdfcb326e7c341853"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3497f23a7f23b8e21d86bbdcf3406449"></a><!-- doxytag: member="AVL树::__avllnk_singular" ref="ga3497f23a7f23b8e21d86bbdcf3406449" args="(avllnk_node *root)" -->
static int&#160;</td><td class="memItemRight" valign="bottom"><b>__avllnk_singular</b> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *root)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga818841161a46f54d53529773eb96bacd">avllnk_singular</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否只有单个节点  <a href="#ga818841161a46f54d53529773eb96bacd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaf8e74e1e8ecd70501d3b4d5fac912f0c">avllnk_serialable</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否可以序列化  <a href="#gaf8e74e1e8ecd70501d3b4d5fac912f0c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gac186538077a32ca88a0b0fb38c7748ee">avllnk_left</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到左子节点  <a href="#gac186538077a32ca88a0b0fb38c7748ee"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga392cad63ddf7750b67b0296c6b27e358">avllnk_right</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到右子节点  <a href="#ga392cad63ddf7750b67b0296c6b27e358"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga691c39005f3bf2afc370f10c4e7d98f1">avllnk_parent</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到父节点  <a href="#ga691c39005f3bf2afc370f10c4e7d98f1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static uintptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaa8353ffe957c498dc63929ed50ee4cf5">avllnk_height</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到节点的高度值  <a href="#gaa8353ffe957c498dc63929ed50ee4cf5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga8ee3f2da09ef4b7d1c00610b3372a01f">avllnk_left_high</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断节点是否是左子树高  <a href="#ga8ee3f2da09ef4b7d1c00610b3372a01f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga04edcfd65b742a3382b3a51eef68f307">avllnk_right_high</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断节点是否是右子树高  <a href="#ga04edcfd65b742a3382b3a51eef68f307"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga364ee370c34025c9318833ee20965759">avllnk_balanced</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断节点是否是平衡的  <a href="#ga364ee370c34025c9318833ee20965759"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">*static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gacfb27f0b831d3c4f83381c6b0956106f">avllnk_is_root</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断当前节点是否是根节点  <a href="#gacfb27f0b831d3c4f83381c6b0956106f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga64ef8761a0fab06321833ee0158ab196">avllnk_is_leaf</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断当前节点是否是叶子节点  <a href="#ga64ef8761a0fab06321833ee0158ab196"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gac43ae3a0dc2bf5d7da2a526d55397fe7">avllnk_link</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> newly, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> parent, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> *plink)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">链接两个节点  <a href="#gac43ae3a0dc2bf5d7da2a526d55397fe7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga2089ba17ce26c8762a19c614a8d06555">avllnk_set_left_high</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点高度为左子树高  <a href="#ga2089ba17ce26c8762a19c614a8d06555"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga09a24ae32f166f358df10788e0f7c284">avllnk_set_right_high</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点高度为右子树高  <a href="#ga09a24ae32f166f358df10788e0f7c284"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga7d074b83d26dcadffe3833166a9c048a">avllnk_set_balanced</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点为平衡节点  <a href="#ga7d074b83d26dcadffe3833166a9c048a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gafb7ce3c4fbef8c022feae53e69f2e4ec">avllnk_set_parent</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node, <a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点的父节点  <a href="#gafb7ce3c4fbef8c022feae53e69f2e4ec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga546ae7404c5213a86aa721036babceff">avllnk_set_parent_if</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node, <a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">仅在node不为空时，设置node的父节点  <a href="#ga546ae7404c5213a86aa721036babceff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga960f9f58b12e793793f259d9340926c9">avllnk_set_parent_height</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node, <a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *parent, uintptr_t height)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">同时设置节点的父节点和高度值  <a href="#ga960f9f58b12e793793f259d9340926c9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga968f04fff9bef8e27bf36936e929a545">avllnk_node_init</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化节点  <a href="#ga968f04fff9bef8e27bf36936e929a545"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga016a1b1accea2b6145fa189bfd119507">avllnk_iter_replace</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> victim, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新节点替换旧节点  <a href="#ga016a1b1accea2b6145fa189bfd119507"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga5f22b54f9ef02ade099fe28889e327b6">avllnk_replace</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *victim, <a class="el" href="structavllnk__root.html">avllnk_root</a> *newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新的树根替换旧树根  <a href="#ga5f22b54f9ef02ade099fe28889e327b6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaa1f82a5e29f572f748a7f76381bb5887">avllnk_swap</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *a, <a class="el" href="structavllnk__root.html">avllnk_root</a> *b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">交换两个树  <a href="#gaa1f82a5e29f572f748a7f76381bb5887"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga704200059c0476fc18782999861d6a14">avllnk_exist</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断一个节点是否存在于树中  <a href="#ga704200059c0476fc18782999861d6a14"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaf3d1abe7c6b78a506b4d3ba41c9e6c27">avllnk_at</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, size_t index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到正向索引对应的节点的迭代器  <a href="#gaf3d1abe7c6b78a506b4d3ba41c9e6c27"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga092e3ed44b3f98a818c234d87503ca73">avllnk_reverse_at</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, size_t index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到逆向索引对应的节点的迭代器  <a href="#ga092e3ed44b3f98a818c234d87503ca73"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga0db4502b30c43020bbb5fe927c7f9d0a">avllnk_front</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到树的最左端节点  <a href="#ga0db4502b30c43020bbb5fe927c7f9d0a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga1634f51b55974ba696e962491ebc4eed">avllnk_back</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到树的最右端节点  <a href="#ga1634f51b55974ba696e962491ebc4eed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gab06d7fe0465e53f4d47490bcdc59ccf4">avllnk_next</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前节点的中序后继节点  <a href="#gab06d7fe0465e53f4d47490bcdc59ccf4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga7311b77daeb0f3c6b467e57207014ccc">avllnk_prev</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前节点的中序前驱节点  <a href="#ga7311b77daeb0f3c6b467e57207014ccc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga792e1e4f83bba2aad61546629e7ca033">avllnk_begin</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向起始位置的迭代器  <a href="#ga792e1e4f83bba2aad61546629e7ca033"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga7bddf514252b09ff2b139cda1178d211">avllnk_end</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向终止位置的迭代器  <a href="#ga7bddf514252b09ff2b139cda1178d211"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gac02afe94da5c646280f522904dff848d">avllnk_end_of</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前迭代器的正向终止位置  <a href="#gac02afe94da5c646280f522904dff848d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaaedf1042b54f902d06e8c685e0b95385">avllnk_rbegin</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向逆向起始位置的迭代器  <a href="#gaaedf1042b54f902d06e8c685e0b95385"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga5aa03d10a252d96ef9e7b478eb59ee66">avllnk_rend</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向逆向终止位置的迭代器  <a href="#ga5aa03d10a252d96ef9e7b478eb59ee66"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gaebf7a263a0ac2f82ffe2c12c854b420c">avllnk_rend_of</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前迭代器的逆向终止位置  <a href="#gaebf7a263a0ac2f82ffe2c12c854b420c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga3f0b2fc1c3ebdcafb623a3906b168ad3">avllnk_advance</a> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur, int dist)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">给迭代器增加一段距离或减小一段距离  <a href="#ga3f0b2fc1c3ebdcafb623a3906b168ad3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gad10426452390142d32dc1a24eb538dbe">avllnk_clear</a> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga6d7aaed44e837466148513a1e9c4b055">avllnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">清空树  <a href="#gad10426452390142d32dc1a24eb538dbe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac2a261a0eaf480d71bb8d0a752f984ea"></a><!-- doxytag: member="AVL树::__avllnk_inc_later" ref="gac2a261a0eaf480d71bb8d0a752f984ea" args="(avllnk_iter cur, avllnk_iter *p)" -->
static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__avllnk_inc_later</b> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadb6cf2a6a90ba3401b08c8bfabe42b03"></a><!-- doxytag: member="AVL树::__avllnk_dec_later" ref="gadb6cf2a6a90ba3401b08c8bfabe42b03" args="(avllnk_iter cur, avllnk_iter *p)" -->
static <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__avllnk_dec_later</b> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaefb38e46d8e02132ef7391eb25c68fbe"></a><!-- doxytag: member="AVL树::__do_avllnk_recurse_foreach" ref="gaefb38e46d8e02132ef7391eb25c68fbe" args="(avllnk_iter cur, void(*fn)(void *), size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__do_avllnk_recurse_foreach</b> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaae6acf7f7ff91bf7c916d7aca9477d7b"></a><!-- doxytag: member="AVL树::__do_avllnk_recurse_reverse_foreach" ref="gaae6acf7f7ff91bf7c916d7aca9477d7b" args="(avllnk_iter cur, void(*fn)(void *), size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__do_avllnk_recurse_reverse_foreach</b> (<a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> cur, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacf908fea84c1ba1365342bd23a507c54"></a><!-- doxytag: member="AVL树::__avllnk_recurse_foreach" ref="gacf908fea84c1ba1365342bd23a507c54" args="(avllnk_root *root, void(*fn)(void *), size_t offset)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__avllnk_recurse_foreach</b> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga543784591c9e3e157d9ea351fff3baa3"></a><!-- doxytag: member="AVL树::__avllnk_recurse_reverse_foreach" ref="ga543784591c9e3e157d9ea351fff3baa3" args="(avllnk_root *root, void(*fn)(void *), size_t offset)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__avllnk_recurse_reverse_foreach</b> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa1d90e4e208682243f6d336ca76eebd2"></a><!-- doxytag: member="AVL树::__avllnk_serialize" ref="gaa1d90e4e208682243f6d336ca76eebd2" args="(avllnk_root *root, void **buf, size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__avllnk_serialize</b> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, void **buf, size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2a14306d9c3c444f988e8d3f4e353ac3"></a><!-- doxytag: member="AVL树::__avllnk_deserialize" ref="ga2a14306d9c3c444f988e8d3f4e353ac3" args="(avllnk_root *root, void **buf, size_t cnt, size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__avllnk_deserialize</b> (<a class="el" href="structavllnk__root.html">avllnk_root</a> *root, void **buf, size_t cnt, size_t offset)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
变量</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gada1586d3a852e7d13f51543c09ac5a58"></a><!-- doxytag: member="AVL树::avllnk_node" ref="gada1586d3a852e7d13f51543c09ac5a58" args="" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">节点 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga391ef925a6daa3822e079a4848543426"></a><!-- doxytag: member="AVL树::avllnk_iter" ref="ga391ef925a6daa3822e079a4848543426" args="" -->
*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器 <br/></td></tr>
</table>
<hr/><h2>宏定义文档</h2>
<a class="anchor" id="ga9f935129e3b1b42561ef2b542ddc8c16"></a><!-- doxytag: member="avllnk.h::AVLLNK_ROOT" ref="ga9f935129e3b1b42561ef2b542ddc8c16" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AVLLNK_ROOT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="structavllnk__root.html">avllnk_root</a> name = {NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的树根，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>树根名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00094">94</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad23c26b8eb6162eb970bc21c23072bc9"></a><!-- doxytag: member="avllnk.h::AVLLNK_NODE" ref="gad23c26b8eb6162eb970bc21c23072bc9" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AVLLNK_NODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> name = {0, NULL, NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的节点，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>节点名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00095">95</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga46bf7c9e6c92af98442241e46bc0fb6e"></a><!-- doxytag: member="avllnk.h::AVLLNK_INFO" ref="ga46bf7c9e6c92af98442241e46bc0fb6e" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AVLLNK_INFO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="structavllnk__info.html">avllnk_info</a> name = {0, 0, 0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的树信息表，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00096">96</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga4d808bbb0fdc74ca311dfcd3501a72ab"></a><!-- doxytag: member="avllnk.h::avllnk_foreach" ref="ga4d808bbb0fdc74ca311dfcd3501a72ab" args="(_begin, _end, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> _q_e = (_end);                          \
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> _q_f = (_begin);                        \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                              \
            type * _q_t = container_of(_q_f, type, member); \
            <a class="code" href="group__AVL_xE6_xA0_x91.html#ga46ed1ab24644d90c5e70a413f455e670" title="迭代器递增">avllnk_inc</a>(_q_f);                               \
            fn(_q_t);                                       \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00818">818</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga90c6c4362d26d8f4018fe435cb6f997c"></a><!-- doxytag: member="avllnk.h::avllnk_reverse_foreach" ref="ga90c6c4362d26d8f4018fe435cb6f997c" args="(_rbegin, _rend, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_reverse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_rbegin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_rend, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> _q_e = (_rend);                         \
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> _q_f = (_rbegin);                       \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                              \
            type * _q_t = container_of(_q_f, type, member); \
            <a class="code" href="group__AVL_xE6_xA0_x91.html#ga16e3c0d56368448f31d026003b3c8f74" title="迭代器递减">avllnk_dec</a>(_q_f);                               \
            fn(_q_t);                                       \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>逆向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_rbegin</td><td>逆向起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_rend</td><td>逆向终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00837">837</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga735253b77b7c2aec0f7bc17680d1035d"></a><!-- doxytag: member="avllnk.h::AVLLNK_RECURSE_PROC" ref="ga735253b77b7c2aec0f7bc17680d1035d" args="(name, type, param)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AVLLNK_RECURSE_PROC</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">param&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;void name(type * param)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义递归遍历回调函数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>函数名 </td></tr>
    <tr><td class="paramname">type</td><td>节点拥有者类型 </td></tr>
    <tr><td class="paramname">param</td><td>参数名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gad56775ebcd996a1da4be44d5f4963c91" title="正向递归遍历整个树">avllnk_recurse_foreach</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga754839960ffe6023b3c85a88a456a774" title="逆向递归遍历整个树">avllnk_recurse_reverse_foreach</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00875">875</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad56775ebcd996a1da4be44d5f4963c91"></a><!-- doxytag: member="avllnk.h::avllnk_recurse_foreach" ref="gad56775ebcd996a1da4be44d5f4963c91" args="(root, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_recurse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">__avllnk_recurse_foreach(root, (<span class="keywordtype">void</span> (*)(<span class="keywordtype">void</span>*))(fn), \
        offset_of(type, member))
</pre></div>
<p>正向递归遍历整个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="group__AVL_xE6_xA0_x91.html#ga735253b77b7c2aec0f7bc17680d1035d" title="定义递归遍历回调函数">AVLLNK_RECURSE_PROC</a>(PrintNode, DATA, node)
    {
        printf(<span class="stringliteral">&quot;%3d &quot;</span>, node-&gt;data);
    }

    <span class="comment">// 打印整个树</span>
    <span class="keywordtype">void</span> PrintAVLTree(<a class="code" href="structavllnk__root.html" title="树根">avllnk_root</a>* root)
    {
        <a class="code" href="group__AVL_xE6_xA0_x91.html#gad56775ebcd996a1da4be44d5f4963c91" title="正向递归遍历整个树">avllnk_recurse_foreach</a>(root, PrintNode, DATA, node);
        putchar(<span class="charliteral">&#39;\n&#39;</span>);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga754839960ffe6023b3c85a88a456a774" title="逆向递归遍历整个树">avllnk_recurse_reverse_foreach</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga735253b77b7c2aec0f7bc17680d1035d" title="定义递归遍历回调函数">AVLLNK_RECURSE_PROC</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00900">900</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga754839960ffe6023b3c85a88a456a774"></a><!-- doxytag: member="avllnk.h::avllnk_recurse_reverse_foreach" ref="ga754839960ffe6023b3c85a88a456a774" args="(root, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_recurse_reverse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">__avllnk_recurse_reverse_foreach(root, (<span class="keywordtype">void</span> (*)(<span class="keywordtype">void</span>*))(fn), \
            offset_of(type, member))
</pre></div>
<p>逆向递归遍历整个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gad56775ebcd996a1da4be44d5f4963c91" title="正向递归遍历整个树">avllnk_recurse_foreach</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga735253b77b7c2aec0f7bc17680d1035d" title="定义递归遍历回调函数">AVLLNK_RECURSE_PROC</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00913">913</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaff35c890d83519b776a6186a94ad29ac"></a><!-- doxytag: member="avllnk.h::avllnk_search" ref="gaff35c890d83519b776a6186a94ad29ac" args="(root, newly, greater, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_search</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="structavllnk__root.html" title="树根">avllnk_root</a>* _k_r = (root);                             \
        type * _k_pn = (newly);                                 \
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> _k_p = _k_r-&gt;<a class="code" href="structavllnk__root.html#a6470b4dbb19f6e6bc4cd94e01400c4ff" title="树根节点">node</a>;                          \
        (res) = NULL;                                           \
        <span class="keywordflow">while</span> (_k_p) {                                          \
            type * _k_pr = container_of(_k_p, type, member);    \
            <span class="keywordflow">if</span> (greater(_k_pr, _k_pn))                          \
                _k_p = _k_p-&gt;left;                              \
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (greater(_k_pn, _k_pr))                     \
                _k_p = _k_p-&gt;right;                             \
            <span class="keywordflow">else</span> {                                              \
                (res) = _k_p; <span class="keywordflow">break</span>;                            \
            }                                                   \
        }                                                       \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>搜索树中的某个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">newly</td><td>用于搜索的临时节点，类型是type，该节点使用与搜索的值相同的值 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏。 升序:(i-&gt;data &gt; j-&gt;data) 降序:(i-&gt;data &lt; j-&gt;data) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>返回值。返回目标节点，若为NULL表示找不到节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> node_15;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="keywordflow">if</span> (!p)
        <span class="keywordflow">return</span> NULL;

    p-&gt;data = 15;

    <span class="comment">//查找值为15的节点</span>
    <a class="code" href="group__AVL_xE6_xA0_x91.html#gaff35c890d83519b776a6186a94ad29ac" title="搜索树中的某个节点">avllnk_search</a>(&amp;root, p, DATA_Greater, node_15, DATA, node);
    <span class="keywordflow">if</span> (!node_15)
        <span class="keywordflow">return</span> NULL;

    <span class="keywordflow">return</span> node_15;
</pre></div> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00945">945</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa70312544a3ecfb8d51680b04ba1c745"></a><!-- doxytag: member="avllnk.h::avllnk_insert" ref="gaa70312544a3ecfb8d51680b04ba1c745" args="(root, newly, greater, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_insert</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="structavllnk__root.html" title="树根">avllnk_root</a>* _k_r = (root);                                     \
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a>* _k_pp = &amp;_k_r-&gt;<a class="code" href="structavllnk__root.html#a6470b4dbb19f6e6bc4cd94e01400c4ff" title="树根节点">node</a>;                               \
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> _k_n = (newly);                                     \
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> _k_p;                                               \
        type * _k_pn = container_of(_k_n, type, member);                \
        (res) = 1;                                                      \
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga968f04fff9bef8e27bf36936e929a545" title="初始化节点">avllnk_node_init</a>(_k_n);                                         \
        <span class="keywordflow">while</span> (*_k_pp) {                                                \
            type * _k_pr = container_of(_k_p = *_k_pp, type, member);   \
            <span class="keywordflow">if</span> (greater(_k_pr, _k_pn))                                  \
                _k_pp = &amp;_k_p-&gt;left;                                    \
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (greater(_k_pn, _k_pr))                             \
                _k_pp = &amp;_k_p-&gt;right;                                   \
            <span class="keywordflow">else</span> {                                                      \
                (res) = 0; <span class="keywordflow">break</span>;                                       \
            }                                                           \
        }                                                               \
        <span class="keywordflow">if</span> (res) {                                                      \
            <a class="code" href="group__AVL_xE6_xA0_x91.html#gac43ae3a0dc2bf5d7da2a526d55397fe7" title="链接两个节点">avllnk_link</a>(_k_n, _k_p, _k_pp);                             \
            <a class="code" href="group__AVL_xE6_xA0_x91.html#ga8d0cac80915509c752cfceebce741037" title="插入节点后，对树进行再平衡调整">avllnk_rebalance</a>(_k_r, _k_n, _k_p);                         \
        }                                                               \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>插入新节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏。 升序:(i-&gt;data &gt; j-&gt;data) 降序:(i-&gt;data &lt; j-&gt;data) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>返回值。返回1表示成功；若为0表示节点有冲突，无法插入 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> ret;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="keywordflow">if</span> (!p)
        <span class="keywordflow">return</span> 0;

    p-&gt;data = 88;

    <span class="comment">//插入值为88的节点</span>
    <a class="code" href="group__AVL_xE6_xA0_x91.html#gaa70312544a3ecfb8d51680b04ba1c745" title="插入新节点">avllnk_insert</a>(&amp;root, &amp;p-&gt;node, DATA_Greater, ret, DATA, node);
    <span class="keywordflow">if</span> (!ret)
        <span class="keywordflow">return</span> 0;

    <span class="keywordflow">return</span> 1;
</pre></div> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00990">990</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6ef8f29070186c926ea5202dd2be868b"></a><!-- doxytag: member="avllnk.h::avllnk_serialize" ref="ga6ef8f29070186c926ea5202dd2be868b" args="(root, buf, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_serialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__avllnk_serialize(root, (void**)(buf), offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>将树进行序列化为一个有序序列 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>序列缓存，元素类型为type指针类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga48ba9521f27bb0961ac4b2d5af927732" title="根据树的序列进行反序列化为一个完整的树">avllnk_deserialize</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gaf8e74e1e8ecd70501d3b4d5fac912f0c" title="判断树是否可以序列化">avllnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l01029">1029</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga48ba9521f27bb0961ac4b2d5af927732"></a><!-- doxytag: member="avllnk.h::avllnk_deserialize" ref="ga48ba9521f27bb0961ac4b2d5af927732" args="(root, buf, cnt, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define avllnk_deserialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cnt, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__avllnk_deserialize(root, (void**)(buf), cnt, offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>根据树的序列进行反序列化为一个完整的树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>序列缓存，元素类型为type指针类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cnt</td><td>序列长度(元素数) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga6ef8f29070186c926ea5202dd2be868b" title="将树进行序列化为一个有序序列">avllnk_serialize</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gaf8e74e1e8ecd70501d3b4d5fac912f0c" title="判断树是否可以序列化">avllnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l01042">1042</a>行定义。</p>

</div>
</div>
<hr/><h2>函数文档</h2>
<a class="anchor" id="ga110276c151b52a9e937f120f863cb34b"></a><!-- doxytag: member="avllnk.h::intrin_align" ref="ga110276c151b52a9e937f120f863cb34b" args="(4) __avllnk_node" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct intrin_align </td>
          <td>(</td>
          <td class="paramtype">4&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><p>父节点和高度信息</p>
<p>左子节点</p>
<p>右子节点 </p>
</p>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00043">43</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga05210b7a523aff433666c4b6c7fec4b4"></a><!-- doxytag: member="avllnk.h::avllnk_count" ref="ga05210b7a523aff433666c4b6c7fec4b4" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t avllnk_count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>获取树的节点总数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回节点数 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga9edbfa0855053c7f9bbd4d6e8a86199d" title="获取树的信息，包括节点数、深度、叶子数">avllnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00682">682</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaeb29658f08fdd8c607c2f04a2dd9afd5"></a><!-- doxytag: member="avllnk.h::avllnk_distance" ref="gaeb29658f08fdd8c607c2f04a2dd9afd5" args="(avllnk_iter first, avllnk_iter last)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t avllnk_distance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>last</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算两个节点的迭代距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>首节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>尾节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>以索引为例，2到4的距离是4 (4-2+1=3) </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回距离 </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00695">695</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa2e635167aec956c163f38e293006b06"></a><!-- doxytag: member="avllnk.h::avllnk_index_of" ref="gaa2e635167aec956c163f38e293006b06" args="(avllnk_root *root, avllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t avllnk_index_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算迭代器的正向索引 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回索引 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga3a272f8492a0090feeb1bf4552b7535b" title="计算迭代器的逆向索引">avllnk_reverse_index_of</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00707">707</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3a272f8492a0090feeb1bf4552b7535b"></a><!-- doxytag: member="avllnk.h::avllnk_reverse_index_of" ref="ga3a272f8492a0090feeb1bf4552b7535b" args="(avllnk_root *root, avllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t avllnk_reverse_index_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算迭代器的逆向索引 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回索引 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gaa2e635167aec956c163f38e293006b06" title="计算迭代器的正向索引">avllnk_index_of</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00720">720</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga584d9cf0d557e45fac9ac792967ecd38"></a><!-- doxytag: member="avllnk.h::avllnk_depth" ref="ga584d9cf0d557e45fac9ac792967ecd38" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t avllnk_depth </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算树的深度 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回深度 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga9edbfa0855053c7f9bbd4d6e8a86199d" title="获取树的信息，包括节点数、深度、叶子数">avllnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00565">565</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0bdae474b1779392de944dbe1eee2d0c"></a><!-- doxytag: member="avllnk.h::avllnk_leafs" ref="ga0bdae474b1779392de944dbe1eee2d0c" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t avllnk_leafs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算树的叶子数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回叶子数 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga9edbfa0855053c7f9bbd4d6e8a86199d" title="获取树的信息，包括节点数、深度、叶子数">avllnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00606">606</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9edbfa0855053c7f9bbd4d6e8a86199d"></a><!-- doxytag: member="avllnk.h::avllnk_get_info" ref="ga9edbfa0855053c7f9bbd4d6e8a86199d" args="(avllnk_root *root, avllnk_info *info)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void avllnk_get_info </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structavllnk__info.html">avllnk_info</a> *&#160;</td>
          <td class="paramname"><em>info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>获取树的信息，包括节点数、深度、叶子数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">info</td><td>保存信息的结构体 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga05210b7a523aff433666c4b6c7fec4b4" title="获取树的节点总数">avllnk_count</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga584d9cf0d557e45fac9ac792967ecd38" title="计算树的深度">avllnk_depth</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga0bdae474b1779392de944dbe1eee2d0c" title="计算树的叶子数">avllnk_leafs</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00633">633</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga8d0cac80915509c752cfceebce741037"></a><!-- doxytag: member="avllnk.h::avllnk_rebalance" ref="ga8d0cac80915509c752cfceebce741037" args="(avllnk_root *root, avllnk_node *node, avllnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void avllnk_rebalance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>插入节点后，对树进行再平衡调整 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>目标节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">parent</td><td>node的父节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>常用于节点插入，在avllnk_link之后调用 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> insert_node(<a class="code" href="structavllnk__root.html" title="树根">avllnk_root</a>* root, DATA* newly)
    {
        DATA* pdat;
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a> cur;
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426" title="迭代器">avllnk_iter</a>* p = &amp;root-&gt;<a class="code" href="structavllnk__root.html#a6470b4dbb19f6e6bc4cd94e01400c4ff" title="树根节点">node</a>;
        
        <span class="comment">// 初始化新节点</span>
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga968f04fff9bef8e27bf36936e929a545" title="初始化节点">avllnk_node_init</a>(&amp;newly-&gt;node);
        
        <span class="keywordflow">while</span> (*p) {
            cur = *p;
            pdat = container_of(cur, DATA, node);
            <span class="keywordflow">if</span> (pdat-&gt;data &gt; newly-&gt;data)
                p = &amp;cur-&gt;left;
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pdat-&gt;data &lt; newly-&gt;data)
                p = &amp;cur-&gt;right;
            <span class="keywordflow">else</span> {
                <span class="comment">// 有相同值的节点，无法插入</span>
                <span class="keywordflow">return</span> 0;
            }
        }
        
        <span class="comment">// 链接新节点到树中</span>
        <a class="code" href="group__AVL_xE6_xA0_x91.html#gac43ae3a0dc2bf5d7da2a526d55397fe7" title="链接两个节点">avllnk_link</a>(&amp;newly-&gt;node, cur, p);
        
        <span class="comment">// 再平衡</span>
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga8d0cac80915509c752cfceebce741037" title="插入节点后，对树进行再平衡调整">avllnk_rebalance</a>(root, &amp;newly-&gt;<a class="code" href="structavllnk__root.html#a6470b4dbb19f6e6bc4cd94e01400c4ff" title="树根节点">node</a>, cur);

        <span class="keywordflow">return</span> 1;
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gaa70312544a3ecfb8d51680b04ba1c745" title="插入新节点">avllnk_insert</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gac43ae3a0dc2bf5d7da2a526d55397fe7" title="链接两个节点">avllnk_link</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00284">284</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf66cbfca9147bf2de3109b0792242c6b"></a><!-- doxytag: member="avllnk.h::avllnk_erase" ref="gaf66cbfca9147bf2de3109b0792242c6b" args="(avllnk_root *root, avllnk_node *entry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void avllnk_erase </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除某个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">entry</td><td>待移除节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00397">397</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga062945f5da72bea1f96c1e79b14ee1d6"></a><!-- doxytag: member="avllnk.h::avllnk_erases" ref="ga062945f5da72bea1f96c1e79b14ee1d6" args="(avllnk_root *root, avllnk_iter begin, avllnk_iter end, avllnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void avllnk_erases </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga6d7aaed44e837466148513a1e9c4b055">avllnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除区域内的节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gad10426452390142d32dc1a24eb538dbe" title="清空树">avllnk_clear</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00455">455</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaaed45fd00cc292f5a5ae11c5939b75af"></a><!-- doxytag: member="avllnk.h::avllnk_init" ref="gaaed45fd00cc292f5a5ae11c5939b75af" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化树根 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">root</td><td>目标树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="structavllnk__root.html" title="树根">avllnk_root</a> r;
    <span class="comment">// 初始化</span>
    <a class="code" href="group__AVL_xE6_xA0_x91.html#gaaed45fd00cc292f5a5ae11c5939b75af" title="初始化树根">avllnk_init</a>(&amp;r);
</pre></div> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00254">254</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaed7a979e936d126bdfcb326e7c341853"></a><!-- doxytag: member="avllnk.h::avllnk_empty" ref="gaed7a979e936d126bdfcb326e7c341853" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否为空 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (!<a class="code" href="group__AVL_xE6_xA0_x91.html#gaed7a979e936d126bdfcb326e7c341853" title="判断树是否为空">avllnk_empty</a>(&amp;r)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00273">273</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga818841161a46f54d53529773eb96bacd"></a><!-- doxytag: member="avllnk.h::avllnk_singular" ref="ga818841161a46f54d53529773eb96bacd" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_singular </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否只有单个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (<a class="code" href="group__AVL_xE6_xA0_x91.html#ga818841161a46f54d53529773eb96bacd" title="判断树是否只有单个节点">avllnk_singular</a>(&amp;r)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00297">297</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf8e74e1e8ecd70501d3b4d5fac912f0c"></a><!-- doxytag: member="avllnk.h::avllnk_serialable" ref="gaf8e74e1e8ecd70501d3b4d5fac912f0c" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_serialable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否可以序列化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>即判断是否至少有一个节点 </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 判断是否可以序列化</span>
    <span class="keywordflow">if</span> (<a class="code" href="group__AVL_xE6_xA0_x91.html#gaf8e74e1e8ecd70501d3b4d5fac912f0c" title="判断树是否可以序列化">avllnk_serialable</a>(&amp;r)) {
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#gab7b8f6f20db0f3e5681fd2184b1ae60c" title="type类型表头">slseq_head</a> seq;
        <span class="comment">// 分配序列缓存</span>
        DATA** buf = (DATA**)malloc(<span class="keyword">sizeof</span>(DATA*) * avl_cnt);
        <span class="comment">// 序列化</span>
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga6ef8f29070186c926ea5202dd2be868b" title="将树进行序列化为一个有序序列">avllnk_serialize</a>(&amp;r, buf, DATA, node);
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga08213d0c7bcf381b466b18e3822c6934" title="初始化序列">SLSEQ_INIT_SERIAL</a>(&amp;seq, buf, avl_cnt);
        ......
        <span class="comment">// do something</span>
        ......
        <span class="comment">// 反序列化</span>
        <a class="code" href="group__AVL_xE6_xA0_x91.html#ga48ba9521f27bb0961ac4b2d5af927732" title="根据树的序列进行反序列化为一个完整的树">avllnk_deserialize</a>(&amp;r, buf, avl_cnt, DATA, node);
        <span class="comment">// 释放缓存</span>
        free(buf);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga6ef8f29070186c926ea5202dd2be868b" title="将树进行序列化为一个有序序列">avllnk_serialize</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga48ba9521f27bb0961ac4b2d5af927732" title="根据树的序列进行反序列化为一个完整的树">avllnk_deserialize</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00331">331</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac186538077a32ca88a0b0fb38c7748ee"></a><!-- doxytag: member="avllnk.h::avllnk_left" ref="gac186538077a32ca88a0b0fb38c7748ee" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_left </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到左子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回左子节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga392cad63ddf7750b67b0296c6b27e358" title="得到右子节点">avllnk_right</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00343">343</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga392cad63ddf7750b67b0296c6b27e358"></a><!-- doxytag: member="avllnk.h::avllnk_right" ref="ga392cad63ddf7750b67b0296c6b27e358" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_right </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到右子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回右子节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gac186538077a32ca88a0b0fb38c7748ee" title="得到左子节点">avllnk_left</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00355">355</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga691c39005f3bf2afc370f10c4e7d98f1"></a><!-- doxytag: member="avllnk.h::avllnk_parent" ref="ga691c39005f3bf2afc370f10c4e7d98f1" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_parent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回父节点 </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00366">366</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa8353ffe957c498dc63929ed50ee4cf5"></a><!-- doxytag: member="avllnk.h::avllnk_height" ref="gaa8353ffe957c498dc63929ed50ee4cf5" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline uintptr_t avllnk_height </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到节点的高度值 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>uintptr_t 返回高度值 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">AVLLNK_LH</td><td>左子树高 </td></tr>
    <tr><td class="paramname">AVLLNK_RH</td><td>右子树高 </td></tr>
    <tr><td class="paramname">AVLLNK_BL</td><td>平衡 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00380">380</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga8ee3f2da09ef4b7d1c00610b3372a01f"></a><!-- doxytag: member="avllnk.h::avllnk_left_high" ref="ga8ee3f2da09ef4b7d1c00610b3372a01f" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_left_high </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断节点是否是左子树高 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>左子树高 </td></tr>
    <tr><td class="paramname">0</td><td>平衡或右子树高 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00393">393</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga04edcfd65b742a3382b3a51eef68f307"></a><!-- doxytag: member="avllnk.h::avllnk_right_high" ref="ga04edcfd65b742a3382b3a51eef68f307" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_right_high </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断节点是否是右子树高 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>右子树高 </td></tr>
    <tr><td class="paramname">0</td><td>平衡或左子树高 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00406">406</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga364ee370c34025c9318833ee20965759"></a><!-- doxytag: member="avllnk.h::avllnk_balanced" ref="ga364ee370c34025c9318833ee20965759" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_balanced </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断节点是否是平衡的 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>平衡 </td></tr>
    <tr><td class="paramname">0</td><td>不平衡 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00419">419</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gacfb27f0b831d3c4f83381c6b0956106f"></a><!-- doxytag: member="avllnk.h::avllnk_is_root" ref="gacfb27f0b831d3c4f83381c6b0956106f" args="(avllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_is_root </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断当前节点是否是根节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>是根节点 </td></tr>
    <tr><td class="paramname">0</td><td>不是根节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00433">433</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga64ef8761a0fab06321833ee0158ab196"></a><!-- doxytag: member="avllnk.h::avllnk_is_leaf" ref="ga64ef8761a0fab06321833ee0158ab196" args="(avllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int avllnk_is_leaf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断当前节点是否是叶子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>是叶子节点 </td></tr>
    <tr><td class="paramname">0</td><td>不是叶子节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00446">446</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac43ae3a0dc2bf5d7da2a526d55397fe7"></a><!-- doxytag: member="avllnk.h::avllnk_link" ref="gac43ae3a0dc2bf5d7da2a526d55397fe7" args="(avllnk_iter newly, avllnk_iter parent, avllnk_iter *plink)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_link </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>newly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> *&#160;</td>
          <td class="paramname"><em>plink</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>链接两个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">parent</td><td>父节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">plink</td><td>父节点对应孩子指针。若newly加入parent的左子，则plink指向 parent的left成员，若newly加入parent的右子，则plink指向 parent的right成员 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>链接newly和parent节点 </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00462">462</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga2089ba17ce26c8762a19c614a8d06555"></a><!-- doxytag: member="avllnk.h::avllnk_set_left_high" ref="ga2089ba17ce26c8762a19c614a8d06555" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_set_left_high </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点高度为左子树高 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00478">478</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga09a24ae32f166f358df10788e0f7c284"></a><!-- doxytag: member="avllnk.h::avllnk_set_right_high" ref="ga09a24ae32f166f358df10788e0f7c284" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_set_right_high </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点高度为右子树高 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00488">488</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga7d074b83d26dcadffe3833166a9c048a"></a><!-- doxytag: member="avllnk.h::avllnk_set_balanced" ref="ga7d074b83d26dcadffe3833166a9c048a" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_set_balanced </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点为平衡节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00499">499</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gafb7ce3c4fbef8c022feae53e69f2e4ec"></a><!-- doxytag: member="avllnk.h::avllnk_set_parent" ref="gafb7ce3c4fbef8c022feae53e69f2e4ec" args="(avllnk_node *node, avllnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_set_parent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点的父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>新的父节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00511">511</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga546ae7404c5213a86aa721036babceff"></a><!-- doxytag: member="avllnk.h::avllnk_set_parent_if" ref="ga546ae7404c5213a86aa721036babceff" args="(avllnk_node *node, avllnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_set_parent_if </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>仅在node不为空时，设置node的父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>新的父节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00525">525</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga960f9f58b12e793793f259d9340926c9"></a><!-- doxytag: member="avllnk.h::avllnk_set_parent_height" ref="ga960f9f58b12e793793f259d9340926c9" args="(avllnk_node *node, avllnk_node *parent, uintptr_t height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_set_parent_height </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uintptr_t&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>同时设置节点的父节点和高度值 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>新的父节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>新的高度值，可选高度值如下:<br/>
 AVLLNK_LH 左子树高<br/>
 AVLLNK_RH 右子树高<br/>
 AVLLNK_BL 子树平衡 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00543">543</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga968f04fff9bef8e27bf36936e929a545"></a><!-- doxytag: member="avllnk.h::avllnk_node_init" ref="ga968f04fff9bef8e27bf36936e929a545" args="(avllnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_node_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#gada1586d3a852e7d13f51543c09ac5a58">avllnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">node</td><td>指定节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00554">554</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga016a1b1accea2b6145fa189bfd119507"></a><!-- doxytag: member="avllnk.h::avllnk_iter_replace" ref="ga016a1b1accea2b6145fa189bfd119507" args="(avllnk_root *root, avllnk_iter victim, avllnk_iter newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_iter_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新节点替换旧节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标节点 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00569">569</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga5f22b54f9ef02ade099fe28889e327b6"></a><!-- doxytag: member="avllnk.h::avllnk_replace" ref="ga5f22b54f9ef02ade099fe28889e327b6" args="(avllnk_root *victim, avllnk_root *newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新的树根替换旧树根 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">newly</td><td>新树根 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00597">597</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa1f82a5e29f572f748a7f76381bb5887"></a><!-- doxytag: member="avllnk.h::avllnk_swap" ref="gaa1f82a5e29f572f748a7f76381bb5887" args="(avllnk_root *a, avllnk_root *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>交换两个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">a</td><td>第一个树 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">b</td><td>第二个树 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00608">608</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga704200059c0476fc18782999861d6a14"></a><!-- doxytag: member="avllnk.h::avllnk_exist" ref="ga704200059c0476fc18782999861d6a14" args="(avllnk_root *root, avllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API int avllnk_exist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断一个节点是否存在于树中 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>指定节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>存在 </td></tr>
    <tr><td class="paramname">0</td><td>不存在 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00484">484</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf3d1abe7c6b78a506b4d3ba41c9e6c27"></a><!-- doxytag: member="avllnk.h::avllnk_at" ref="gaf3d1abe7c6b78a506b4d3ba41c9e6c27" args="(avllnk_root *root, size_t index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到正向索引对应的节点的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>指定正向索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga092e3ed44b3f98a818c234d87503ca73" title="得到逆向索引对应的节点的迭代器">avllnk_reverse_at</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00632">632</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga092e3ed44b3f98a818c234d87503ca73"></a><!-- doxytag: member="avllnk.h::avllnk_reverse_at" ref="ga092e3ed44b3f98a818c234d87503ca73" args="(avllnk_root *root, size_t index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_reverse_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到逆向索引对应的节点的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>指定逆向索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gaf3d1abe7c6b78a506b4d3ba41c9e6c27" title="得到正向索引对应的节点的迭代器">avllnk_at</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00646">646</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0db4502b30c43020bbb5fe927c7f9d0a"></a><!-- doxytag: member="avllnk.h::avllnk_front" ref="ga0db4502b30c43020bbb5fe927c7f9d0a" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_front </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到树的最左端节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga1634f51b55974ba696e962491ebc4eed" title="得到树的最右端节点">avllnk_back</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00497">497</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga1634f51b55974ba696e962491ebc4eed"></a><!-- doxytag: member="avllnk.h::avllnk_back" ref="ga1634f51b55974ba696e962491ebc4eed" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_back </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到树的最右端节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga0db4502b30c43020bbb5fe927c7f9d0a" title="得到树的最左端节点">avllnk_front</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00511">511</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab06d7fe0465e53f4d47490bcdc59ccf4"></a><!-- doxytag: member="avllnk.h::avllnk_next" ref="gab06d7fe0465e53f4d47490bcdc59ccf4" args="(avllnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前节点的中序后继节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回后继节点，若无后继，则返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga7311b77daeb0f3c6b467e57207014ccc" title="得到当前节点的中序前驱节点">avllnk_prev</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00525">525</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga7311b77daeb0f3c6b467e57207014ccc"></a><!-- doxytag: member="avllnk.h::avllnk_prev" ref="ga7311b77daeb0f3c6b467e57207014ccc" args="(avllnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_prev </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前节点的中序前驱节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回前驱节点，若无前驱，则返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gab06d7fe0465e53f4d47490bcdc59ccf4" title="得到当前节点的中序后继节点">avllnk_next</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00545">545</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga792e1e4f83bba2aad61546629e7ca033"></a><!-- doxytag: member="avllnk.h::avllnk_begin" ref="ga792e1e4f83bba2aad61546629e7ca033" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_begin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga7bddf514252b09ff2b139cda1178d211" title="得到指向正向终止位置的迭代器">avllnk_end</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gac02afe94da5c646280f522904dff848d" title="得到当前迭代器的正向终止位置">avllnk_end_of</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gaaedf1042b54f902d06e8c685e0b95385" title="得到指向逆向起始位置的迭代器">avllnk_rbegin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga5aa03d10a252d96ef9e7b478eb59ee66" title="得到指向逆向终止位置的迭代器">avllnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00694">694</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga7bddf514252b09ff2b139cda1178d211"></a><!-- doxytag: member="avllnk.h::avllnk_end" ref="ga7bddf514252b09ff2b139cda1178d211" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向终止位置的迭代器 </p>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器，永远返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga792e1e4f83bba2aad61546629e7ca033" title="得到指向正向起始位置的迭代器">avllnk_begin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gac02afe94da5c646280f522904dff848d" title="得到当前迭代器的正向终止位置">avllnk_end_of</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gaaedf1042b54f902d06e8c685e0b95385" title="得到指向逆向起始位置的迭代器">avllnk_rbegin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga5aa03d10a252d96ef9e7b478eb59ee66" title="得到指向逆向终止位置的迭代器">avllnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00705">705</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac02afe94da5c646280f522904dff848d"></a><!-- doxytag: member="avllnk.h::avllnk_end_of" ref="gac02afe94da5c646280f522904dff848d" args="(avllnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_end_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前迭代器的正向终止位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga792e1e4f83bba2aad61546629e7ca033" title="得到指向正向起始位置的迭代器">avllnk_begin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga7bddf514252b09ff2b139cda1178d211" title="得到指向正向终止位置的迭代器">avllnk_end</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00717">717</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaaedf1042b54f902d06e8c685e0b95385"></a><!-- doxytag: member="avllnk.h::avllnk_rbegin" ref="gaaedf1042b54f902d06e8c685e0b95385" args="(avllnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_rbegin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向逆向起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga5aa03d10a252d96ef9e7b478eb59ee66" title="得到指向逆向终止位置的迭代器">avllnk_rend</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gaebf7a263a0ac2f82ffe2c12c854b420c" title="得到当前迭代器的逆向终止位置">avllnk_rend_of</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga792e1e4f83bba2aad61546629e7ca033" title="得到指向正向起始位置的迭代器">avllnk_begin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga7bddf514252b09ff2b139cda1178d211" title="得到指向正向终止位置的迭代器">avllnk_end</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00729">729</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga5aa03d10a252d96ef9e7b478eb59ee66"></a><!-- doxytag: member="avllnk.h::avllnk_rend" ref="ga5aa03d10a252d96ef9e7b478eb59ee66" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_rend </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向逆向终止位置的迭代器 </p>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器，永远返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gaaedf1042b54f902d06e8c685e0b95385" title="得到指向逆向起始位置的迭代器">avllnk_rbegin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#gaebf7a263a0ac2f82ffe2c12c854b420c" title="得到当前迭代器的逆向终止位置">avllnk_rend_of</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga792e1e4f83bba2aad61546629e7ca033" title="得到指向正向起始位置的迭代器">avllnk_begin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga7bddf514252b09ff2b139cda1178d211" title="得到指向正向终止位置的迭代器">avllnk_end</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00740">740</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaebf7a263a0ac2f82ffe2c12c854b420c"></a><!-- doxytag: member="avllnk.h::avllnk_rend_of" ref="gaebf7a263a0ac2f82ffe2c12c854b420c" args="(avllnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_rend_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前迭代器的逆向终止位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#gaaedf1042b54f902d06e8c685e0b95385" title="得到指向逆向起始位置的迭代器">avllnk_rbegin</a>, <a class="el" href="group__AVL_xE6_xA0_x91.html#ga5aa03d10a252d96ef9e7b478eb59ee66" title="得到指向逆向终止位置的迭代器">avllnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00752">752</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3f0b2fc1c3ebdcafb623a3906b168ad3"></a><!-- doxytag: member="avllnk.h::avllnk_advance" ref="ga3f0b2fc1c3ebdcafb623a3906b168ad3" args="(avllnk_iter cur, int dist)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a> avllnk_advance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga391ef925a6daa3822e079a4848543426">avllnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dist</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>给迭代器增加一段距离或减小一段距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>迭代器 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dist</td><td>增加的距离。正数时，表示增加；负数时，表示减小 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>avllnk_iter 返回新迭代器 </dd></dl>

<p>在文件<a class="el" href="avllnk_8c_source.html">avllnk.c</a>第<a class="el" href="avllnk_8c_source.html#l00472">472</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad10426452390142d32dc1a24eb538dbe"></a><!-- doxytag: member="avllnk.h::avllnk_clear" ref="gad10426452390142d32dc1a24eb538dbe" args="(avllnk_root *root, avllnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void avllnk_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structavllnk__root.html">avllnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__AVL_xE6_xA0_x91.html#ga6d7aaed44e837466148513a1e9c4b055">avllnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>清空树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group__AVL_xE6_xA0_x91.html#ga062945f5da72bea1f96c1e79b14ee1d6" title="移除区域内的节点">avllnk_erases</a> </dd></dl>

<p>在文件<a class="el" href="avllnk_8h_source.html">avllnk.h</a>第<a class="el" href="avllnk_8h_source.html#l00776">776</a>行定义。</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:42 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
